![]() |
DMAddDisplay |
||||
Header: | Displays.h | Carbon status: | Supported | |
Adds the GDevice structure for a video device to the device list.
OSErr DMAddDisplay ( GDHandle newDevice, SInt16 driver, UInt32 mode, UInt32 reserved, UInt32 displayID, Component displayComponent, Handle displayState );
A handle to the GDevice structure for the video device you want to add to the device list. The function DMNewDisplay usually initializes this structure.
The reference number of the graphics device which you are adding to the device list. For most video devices, this information is set at system startup. The function DMAddDisplay passes the number supplied in this parameter to the InitGDevice function in its gdRefNum parameter.
The depth mode. Used by the video device driver, this value sets the pixel depth and specifies color. The function DMAddDisplay passes the value supplied here to the function InitGDevice in its mode parameter.
Reserved for future expansion. Pass NULL in this parameter.
A unique identification for the display. For new displays, supply this parameter with the value 0, which causes the Display Manager to generate a unique display ID for this device. If this display was removed, then pass the display ID number of the current display in this parameter.
Reserved for future expansion. Pass NULL in this parameter.
If your application called DMBeginConfigureDisplays, you must pass the displayState handle obtained. Otherwise pass NULL in this parameter.
A result code.
The DMAddDisplay function adds the display specified by the newDevice parameter as inactive. However, if the specified display is the only display, the Display Manager automatically makes it active. Otherwise, you must call the function DMEnableDisplay to make the specified display active.
The function DMNewDisplay
automatically calls DMAddDisplay and DMEnableDisplay. The only time you ned to call DMAddDisplay directly is after the device has been removed by DMRemoveDisplay but not yet disposed of by DMDisposeDisplay.
Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.
Generally, your application should not use this function, but should instead allow system software to maintain the device list. This function is described here for completeness only.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)